import {
    httpGet
} from "@/appBase/request";
import {
    toPageQueryParam,
    toPageData,
    toData,
    createNotPageDataPromise
} from "@/appBase/utils";
export function queryDemoPageList(queryParam, pageParam) {
    return createNotPageDataPromise().then((result) => {
        result.data = [{
            id: 123,
            tel: '12312asd',
            tel1: '23123',
            status: -1
        }, {
            id: 132,
            tel: '12312asd',
            tel1: '23123',
            status: 1
        }]
        return result;
    });
    // return httpGet('/sys/customer/session/getMsgChatRecordList',toPageQueryParam(queryParam, pageParam)).then((result) => toPageData(result));
}

/**
 * 查询教师列表
 * @param {Object} queryParam
 * @param {String} queryParam.account 教师账户
 * @param {String} queryParam.beginTime 开始时间
 * @param {String} queryParam.endTime 结束时间
 * @param {String} queryParam.majorCode 专业编码
 * @param {String} queryParam.name 姓名
 * @param {Number} queryParam.phone 手机号
 * @param {Number} queryParam.sex 性别
 * @param {Number} queryParam.status 状态(1-正常 -1停用)
 * @param {Object} pageParam
 * @param {Number} pageParam.pageNo 
 * @param {Number} pageParam.pageSize 
 */
export function queryEduTeacherList(queryParam, pageParam) {
    const result = {
        "total": 1,
        "data": {
            "list": [{
                "account": "PS",
                "name": "星辰",
                "sex": 0,
                "phone": "15123085381",
                "collegeCode": "0",
                "majorCode": "4",
                "introduction": "",
                "password": "$2a$10$QcSR2kDXi3/BkzQz7m4pBevqXYytBFXfti9.dc1Cu1VE6o97RxPq.",
                "headUrl": "",
                "status": 1,
                "major": "计算机信息管理",
                "sexLabel": "男",
                "createdTime": "2021-10-29T06:55:06.000+00:00",
                "id": "903658207263154176"
            }],
            "total": 18,
        },
        "code": 200,
        "msg": "查询成功"
    };
    return Promise.resolve(toPageData(result, pageParam));
    // return httpGet(`/edu/teacher/list`, toPageQueryParam(queryParam, pageParam)).then((result) => toPageData(result, pageParam));
}

/**
 * 查询教师详情
 * @param {Object} params
 * @param {String} params.id
 */
export function queryEduTeacherDetail(params) {
    const result = {
        "msg": "操作成功",
        "code": 200,
        "data": {
            "account": "PS",
            "name": "星辰",
            "sex": 0,
            "phone": "15123085381",
            "collegeCode": "0",
            "majorCode": "4",
            "introduction": "",
            "password": "$2a$10$QcSR2kDXi3/BkzQz7m4pBevqXYytBFXfti9.dc1Cu1VE6o97RxPq.",
            "headUrl": "",
            "status": 1,
            "major": "计算机信息管理",
            "sexLabel": "男",
            "createdTime": "2021-10-29T06:55:06.000+00:00",
            "id": "903658207263154176"
        }
    };
    return Promise.resolve(toData(result));
    // return httpGet(`/edu/teacher/${params.id}`).then((result) => toData(result));
}

/**
 * 查询报销申请业务列表
 * @param {Object} params
 * @param {String} params.id
 * @param {Object} pageParam
 * @param {Number} pageParam.pageNo 
 * @param {Number} pageParam.pageSize 
 */
export function queryReimburseOrderList(params, pageParam) {
    const result = {
        "data": {
            "total": 1,
            "list": [{
                "bizSerialNo": "2022011000012",
                "bizName": "差旅费",
                "bizFullName": "差旅费",
                "totalAmt": "3,143.00",
                "createdTime": "2022-01-04 16:53:13",
                "createdUserName": "敬卢婕",
                "taskKeyName": "副总"
            }],
        },
        "code": 200,
        "msg": "查询成功"
    };
    return Promise.resolve(toPageData(result, pageParam));
    // return httpGet(`/edu/teacher/${params.id}`).then((result) => toData(result));
}

/**
 * 查询借款申请业务列表
 * @param {Object} params
 * @param {String} params.id
 * @param {Object} pageParam
 * @param {Number} pageParam.pageNo 
 * @param {Number} pageParam.pageSize 
 */
export function queryLoanOrderList(params, pageParam) {
    const result = {
        "data": {
            "total": 4,
            "list": [{
                    "bizSerialNo": "2022011000012",
                    "bizName": "差旅费",
                    "bizFullName": "差旅费",
                    "totalAmt": "3,143.00",
                    "createdTime": "2022-01-04 16:53:13",
                    "createdUserName": "敬卢婕",
                    "taskKeyName": "副总"
                },
                {
                    "bizSerialNo": "2022011000011",
                    "bizName": "办公费用/办公其他",
                    "bizFullName": "办公费用/办公其他",
                    "totalAmt": "9,431.00",
                    "createdTime": "2022-01-04 16:49:56",
                    "createdUserName": "王利如",
                    "taskKeyName": "副总"
                },
                {
                    "bizSerialNo": "2022011000010",
                    "bizName": "员工福利费/员工礼金",
                    "bizFullName": "员工福利费/员工礼金",
                    "totalAmt": "10,000.00",
                    "createdTime": "2022-01-04 16:45:40",
                    "createdUserName": "杜丹箐",
                    "taskKeyName": "完结"
                },
                {
                    "bizSerialNo": "2022011000009",
                    "bizName": "GHDA环球人居设计大奖 项目申报费用",
                    "bizFullName": "GHDA环球人居设计大奖 项目申报费用",
                    "totalAmt": "1,000.00",
                    "createdTime": "2022-01-04 14:17:41",
                    "createdUserName": "王月超",
                    "taskKeyName": "出纳"
                }
            ],
        },
        "code": 200,
        "msg": "查询成功"
    };
    return Promise.resolve(toPageData(result, pageParam));
    // return httpGet(`/edu/teacher/${params.id}`).then((result) => toData(result));
}

/**
 * 查询报销申请业务详情信息
 * @param {Object} params
 * @param {String} params.id
 */
export function queryReimburseOrderDetail(params) {
    const result = {
        "msg": "操作成功",
        "code": 200,
        "data": {
            "orderId": 2022011000012,
            "isMyTask": 1,
            "operType": 0,
            "bizSerialNo": "2022011000012",
            "createdTime": "2022-01-04 16:53:13",
            "createdUserName": "敬卢婕",
            "createdDeptName": "财务部",
            "totalAmt": "3,143.00",
            "planAmt": "3,143.00",
            "loanAmt": "0",
            "deductAmt": "0",
            "orderDetailList": {
                "bizType": "差旅费",
                "bizTypeName": "差旅费",
                "summary": "差旅费",
                "amount": 3149,
                "remark": ""
            },
            "orderAccountList": {
                "bankAccountId": 62556545485488548622654,
                "supplierId": 15156415565,
                "supplierName": "",
                "bankAccount": "",
                "bankName": "",
                "amount": 10000
            },
            "orderRelateList": {
                "relateOrderId": 15154646465,
                "relateSerialNo": "",
                "relateTypeName": ""
            },
            "orderAttachList": {
                "fileId": 546546468458,
                "fileName": "",
                "fileUrl": "",
                "fileSize": ""
            },
            "orderLogList ": {
                "operUser": "",
                "taskKeyName": "",
                "operStatus": 2,
                "operStatusName": "审批同意",
                "comment": "",
                "operTime": "",
            }
        }
    };
    return Promise.resolve(toData(result));
    // return httpGet(`/edu/teacher/${params.id}`).then((result) => toData(result));
}

/**
 * 查询资源列表
 * @param {Object} queryParam
 * @param {String} queryParam.categoryId 分类id
 * @param {Number} queryParam.status 状态(1-正常 -1停用)
 * @param {String} queryParam.tags 标签
 * @param {String} queryParam.title 标题
 * @param {String} queryParam.typeCode 资源类型编码
 * @param {String} queryParam.beginTime 开始时间
 * @param {String} queryParam.endTime 结束时间
 * @param {Object} pageParam
 * @param {Number} pageParam.pageNo 
 * @param {Number} pageParam.pageSize 
 */
export function queryResFileList(queryParam, pageParam) {
    const result = {
        "data": {
            "total": 83,
            "list": [{
                "id": "906597382781755392",
                "createdTime": "2021-11-06T09:34:20.000+00:00",
                "updatedTime": "2021-11-06T09:34:20.000+00:00",
                "remark": null,
                "isDeleted": -1,
                "categoryId": "906528477434044416",
                "title": "思政",
                "tags": "PPT|微课|教案",
                "picUrl": "https://jnzyxx-1.oss-cn-hangzhou.aliyuncs.com/prod/2021/11/06/906796532a554b7aa649a79b8ef289e3.jpg",
                "description": "",
                "viewNum": 3169,
                "status": 1,
                "sortNo": 0
            }, {
                "id": "907647450964123648",
                "createdTime": "2021-11-09T07:06:56.000+00:00",
                "updatedTime": "2021-11-09T07:06:56.000+00:00",
                "remark": null,
                "isDeleted": -1,
                "categoryId": "906861428068147200",
                "title": "名师成长案例及启示",
                "tags": "PPT|微课|教案",
                "picUrl": "https://jnzyxx-1.oss-cn-hangzhou.aliyuncs.com/prod/2021/11/09/30d6c3bbb9764eb5a78e33bfcc339ed8.jpg",
                "description": "",
                "viewNum": 3597,
                "status": 1,
                "sortNo": 0
            }, {
                "id": "906542523432919040",
                "createdTime": "2019-02-06T16:00:00.000+00:00",
                "updatedTime": "2021-11-06T05:56:20.000+00:00",
                "remark": null,
                "isDeleted": -1,
                "categoryId": "906528477434044416",
                "title": "英语",
                "tags": "PPT|微课|教案",
                "picUrl": "https://jnzyxx-1.oss-cn-hangzhou.aliyuncs.com/prod/2021/11/06/fdc14d2e806a4b6a8bd9ed79ea9bf590.jpg",
                "description": "",
                "viewNum": 4406,
                "status": 1,
                "sortNo": 0
            }, {
                "id": "906563955370057728",
                "createdTime": "2019-02-05T16:00:00.000+00:00",
                "updatedTime": "2021-11-06T07:21:30.000+00:00",
                "remark": null,
                "isDeleted": -1,
                "categoryId": "905465512572968960",
                "title": "公共营养学",
                "tags": "教案|PPT|微课",
                "picUrl": "https://jnzyxx-1.oss-cn-hangzhou.aliyuncs.com/prod/2021/11/06/b8bf1e1393d14dca94953bc14ee45068.png",
                "description": "",
                "viewNum": 4339,
                "status": 1,
                "sortNo": 0
            }, {
                "id": "906559643575214080",
                "createdTime": "2019-08-03T16:00:00.000+00:00",
                "updatedTime": "2021-11-06T07:04:22.000+00:00",
                "remark": null,
                "isDeleted": -1,
                "categoryId": "895959774784479232",
                "title": "色彩与素描",
                "tags": "教案|PPT|微课",
                "picUrl": "https://jnzyxx-1.oss-cn-hangzhou.aliyuncs.com/prod/2021/11/06/ef128abd91a14adb8ca85360d0e8b448.png",
                "description": "",
                "viewNum": 5941,
                "status": 1,
                "sortNo": 0
            }, {
                "id": "906567039760556032",
                "createdTime": "2019-06-02T16:00:00.000+00:00",
                "updatedTime": "2021-11-06T07:33:45.000+00:00",
                "remark": null,
                "isDeleted": -1,
                "categoryId": "905465512572968960",
                "title": "急救护理技术",
                "tags": "教案|PPT|微课",
                "picUrl": "https://jnzyxx-1.oss-cn-hangzhou.aliyuncs.com/prod/2021/11/06/0277a2426c2f4f62908a3354b59a2885.png",
                "description": "",
                "viewNum": 5341,
                "status": 1,
                "sortNo": 0
            }, {
                "id": "907647220159963136",
                "createdTime": "2021-11-09T07:06:01.000+00:00",
                "updatedTime": "2021-11-09T07:06:01.000+00:00",
                "remark": null,
                "isDeleted": -1,
                "categoryId": "906861428068147200",
                "title": "班主任工作基本规范",
                "tags": "PPT|微课|教案",
                "picUrl": "https://jnzyxx-1.oss-cn-hangzhou.aliyuncs.com/prod/2021/11/09/a2679a8ee9a74c2e90c9f2626ca4b12f.jpg",
                "description": "",
                "viewNum": 3599,
                "status": 1,
                "sortNo": 0
            }, {
                "id": "906562075600445440",
                "createdTime": "2019-03-03T16:00:00.000+00:00",
                "updatedTime": "2021-11-06T07:14:02.000+00:00",
                "remark": null,
                "isDeleted": -1,
                "categoryId": "895959665711603712",
                "title": "形象与礼仪",
                "tags": "教案|PPT|微课",
                "picUrl": "https://jnzyxx-1.oss-cn-hangzhou.aliyuncs.com/prod/2021/11/06/ac1584049aa54de99e855475bcdc1d52.png",
                "description": "",
                "viewNum": 4068,
                "status": 1,
                "sortNo": 0
            }, {
                "id": "907649699211730944",
                "createdTime": "2021-11-09T07:15:52.000+00:00",
                "updatedTime": "2021-11-09T07:15:52.000+00:00",
                "remark": null,
                "isDeleted": -1,
                "categoryId": "906861428068147200",
                "title": "教育数字资源的获取方法",
                "tags": "PPT|微课|教案",
                "picUrl": "https://jnzyxx-1.oss-cn-hangzhou.aliyuncs.com/prod/2021/11/09/926661b44a004d61879bcc6ce490fef7.jpg",
                "description": "",
                "viewNum": 3602,
                "status": 1,
                "sortNo": 0
            }, {
                "id": "907648548596703232",
                "createdTime": "2021-11-09T07:11:17.000+00:00",
                "updatedTime": "2021-11-09T07:11:17.000+00:00",
                "remark": null,
                "isDeleted": -1,
                "categoryId": "906861428068147200",
                "title": "图形图像处理",
                "tags": "PPT|微课|教案",
                "picUrl": "https://jnzyxx-1.oss-cn-hangzhou.aliyuncs.com/prod/2021/11/09/1114ee61f2ce407b993bfca95bf6f863.jpg",
                "description": "",
                "viewNum": 2843,
                "status": 1,
                "sortNo": 0
            }],
        },
        "code": 200,
        "msg": "查询成功"
    };
    return Promise.resolve(toPageData(result, pageParam));
    return httpGet(`/res/curriculum/list`, toPageQueryParam(queryParam, pageParam)).then((result) => toPageData(result, pageParam)).then((result) => {
        return result;
    });
}